<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
//    return $request->user();
//});

Route::any('test', 'IndexController@test');

Route::middleware([\App\Http\Middleware\checkLogin::class])->post('set_pay_password', 'UserController@setPayPassword'); //获取个人信息

Route::post('reset_password', 'UserController@resetUserPassword'); //重置个人登录密码

Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_user', 'UserController@getUser'); //获取个人信息
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_user_area', 'UserController@getUserArea'); //获取个人区域
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_district', 'DistrictController@getDistrict'); //获取地区
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('add_address', 'UserController@addAddress'); //添加收获地址
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_address', 'UserController@getAddress'); //获取收获地址
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('del_address', 'UserController@delAddress'); //获取收获地址
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_address_info', 'UserController@getAddressInfo'); //获取收获地址详情
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_user_share_pic', 'UserController@getUserSharePic'); //获取用户分享吗
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_child_user', 'UserController@getChildUser'); //获取我得好友
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_child_user_two', 'UserController@getChildUserTwo'); //获取我得好友
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_friend_info', 'UserController@getFriendUserInfo'); //获取好友详情
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_friend_order', 'UserController@getFriendUserOrder'); //获取好友订单
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_all_child_user', 'UserController@getAllChildUser'); //获取我得朋友圈
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_user_flow', 'UserController@getUserFlow'); //获取我得朋友圈

Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_user_repeat_flow', 'UserController@getUserRepeatFlow'); //获取我得朋友圈

Route::middleware([\App\Http\Middleware\checkLogin::class])->post('update_user_info', 'UserController@updateUserInfo'); //获取我得朋友圈

//银行卡
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('add_bank', 'UserBankController@addBank'); //添加银行卡
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('edit_bank', 'UserBankController@editBank'); //编辑银行卡
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_bank_list', 'UserBankController@getBankList'); //添加银行卡
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('bank_info', 'UserBankController@bankInfo'); //添加银行卡
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('del_bank', 'UserBankController@delBank'); //添加银行卡
//用户提现
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('apply_withdrawal', 'WithdrawalController@applyWithdrawal'); //提现申请
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_withdrawal', 'WithdrawalController@getWithdrawalList'); //获取提现记录

Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_mobile_info', 'TransferMoneyController@getMobileInfo'); //根据手机号获取用户详情
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('to_user_money', 'TransferMoneyController@to_user_money'); //用户之间的转账
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_to_user_money', 'TransferMoneyController@getToUserMoneyInfo'); //用户之间的转账详情
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('confirm_user_money', 'TransferMoneyController@confirmUserMoney'); //转账间的二次确认

Route::middleware([\App\Http\Middleware\checkLogin::class])->post('add_order', 'OrderController@addOrder'); //创建订单
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('pay_money_notice', 'NoticeController@payNotice'); //使用余额支付
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('pay_repeat_money_notice', 'NoticeController@payRepeatMoneyNotice'); //使用余额支付
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_order_info', 'OrderController@getOrderInfo'); //获取订单详情
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_order_list', 'OrderController@getOrderList'); //获取订单列表
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('wechat_pay', 'OrderController@wechatPay'); //使用余额支付
Route::middleware([\App\Http\Middleware\checkLogin::class])->post('update_order_address', 'OrderController@updateOrderAddress'); //修改订单地址

Route::middleware([\App\Http\Middleware\checkLogin::class])->post('add_group_order', 'OrderController@addGroupOrder'); //创建套餐订单
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('more_goods', 'OrderController@moreGoods'); //是否可以下单多个

Route::middleware([\App\Http\Middleware\checkLogin::class])->get('source_list', 'SourceContentController@getSourceList'); //获取素材列表


Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_content_info', 'ContentController@getContentInfo'); //获取内容列表


Route::middleware([\App\Http\Middleware\checkLogin::class])->post('create_user_recharge', 'UserRechargeController@createUserRecharge'); //创建充值订单
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('user_recharge_info', 'UserRechargeController@getUserRechargeInfo'); //创建充值订单

Route::middleware([\App\Http\Middleware\checkLogin::class])->post('apply_store', 'UserApplyStoreController@applyStore'); //店铺申请
Route::middleware([\App\Http\Middleware\checkLogin::class])->get('get_apply_store_info', 'UserApplyStoreController@applyStoreInfo'); //店铺申请详情


Route::post('user_register', 'UserController@userRegister'); //注册用户
Route::post('user_login', 'UserController@userLogin'); //注册用户
Route::get('goods_list', 'GoodsController@getGoodsList'); //获取商品列表

Route::get('cate_list', 'GoodsController@getCateList'); //获取分类列表

Route::get('goods_info', 'GoodsController@getGoodsInfo'); //获取商品详情
Route::post('upload_img', 'CommonController@uploadImg'); //上传图片
Route::post('wechat_pay_notice', 'NoticeController@wechatPayNotice')->name('wechatPayNotice'); //用户微信支付回调
Route::post('wechat_pay_recharge_notice', 'NoticeController@wechatRechargeNotice')->name('wechatRechargeNotice'); //用户微信支付回调
Route::post('wechat_refund_order', 'NoticeController@wechatRefundOrder')->name('wechatRefundOrder'); //订单退款的回调

Route::get('group_goods_list', 'GoodsGroupController@getGroupGoods'); //获取套餐商品列表
Route::get('group_goods_info', 'GoodsGroupController@getGroupGoodsInfo'); //获取套餐商品详情

Route::get('system_notice_message', 'SystemNoticeController@getSystemNoticeList'); //获取系统消息
Route::get('get_carouse', 'CarouseController@getCarouse'); //获取轮播图
Route::get('get_pinpai', 'CommonController@getPinpai'); //获取轮播图
Route::post('send_sms', 'CommonController@sendSms'); //发送短信验证码
Route::get('get_commission', 'CommonController@getCommission'); //获取手续费
Route::get('get_mini_con', 'CommonController@getMiniConfig'); //小程序配置
Route::any('getserviceopenid', 'CommonController@getServeropenid'); //小程序配置
Route::get('get_content', 'ContentController@getContentList'); //获取内容列表
Route::get('get_month_money', 'CommonController@getMonthMoney'); //获取用户业绩


